package com.ww.learn.oop.constructor

/**
 * 次构造函数
 */
class Person(val pets: MutableList<Pet> = mutableListOf())

class Pet {
    /**
     * 次构造函数
     */
    constructor(owner: Person) {
        owner.pets.add(this)
    }
}